#include <cpp_primer.h>

using namespace std;
using namespace std::placeholders;

bool check_size(const string &s1, const string &s2);

int main()
{
    string str("1234");
    vector<string> svec{"11", "2345", "1234", "123 ", "123456", "12345"};

    auto sum = count_if(svec.cbegin(), svec.cend(), bind(check_size, cref(str), _2));
    // auto sum = count_if(svec.cbegin(), svec.cend(), bind(check_size, cref(str), _1));
    cout << sum << endl;

    return 0;

}

bool check_size(const string &s1, const string &s2)
{
    return s2.size() > s1.size();

}
